package no.ntnu.fp.testing;

import static org.junit.Assert.*;

import java.sql.Connection;

import no.ntnu.fp.model.FactoryProject;
import no.ntnu.fp.storage.FactoryDbStorage;

import org.junit.Before;
import org.junit.Test;

public class FactoryDbStorageTest {
	
	FactoryDbStorage f;
	Connection con;
	@Before
	public void setUp() throws Exception {
		 f = new FactoryDbStorage();
		 assertTrue(f instanceof FactoryDbStorage);
	}

	@Test
	public void testConnectToFactoryDb() {
		 con = f.connectToFactoryDb();
		 assertNotNull(con);
	}

	@Test
	public void testOpenFactoryProject() {
		FactoryProject fp = f.openFactoryProject();
		assertTrue(fp instanceof FactoryProject);
		
	}

}
